#include "FileSplitter2.cpp"

class MainForm : public Form
{
    SplitterFactory *factory; // 工厂

public:
    MainForm(SplitterFactory *factory)
    {
        // 未来通过调用者的具体工厂的传入来决定类的创建
        this->factory = factory;
    }

    void Button1_Click()
    {

        ISplitter *splitter = factory->CreateSplitter(); // 多态new

        splitter->split();
    }
};
